package morning.cat;

import morning.cat.model.Tool;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;

/**
 * @describe: 类描述信息
 * @author: morningcat.zhang
 * @date: 2020/1/13 4:18 PM
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:META-INF/ToolFactoryBean.xml"})
public class Starter6FactoryBean {

	@Autowired
	private Tool tool;

	@Test
	public void testConstructWorkerByXml() {
		assertThat(tool.getId(), equalTo(1));
	}
}
